<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
<!--    <h1>注册页面</h1>-->
<!--    <input type="text" v-model="user.username" placeholder="用户名">-->
<!--    <input type="text" v-model="user.password" placeholder="密码">-->
<!--    <input type="text" v-model="user.nick" placeholder="昵称">-->
<!--    <input type="button" value="注册" @click="reg()">-->
    <el-form ref="form" :model="form" label-width="80px">
        <el-form-item label="请输入密码">
            <el-input v-model="form.password"></el-input>
        </el-form-item>
        <el-form-item label="请确认密码">
            <el-input v-model="form.password"></el-input>
        </el-form-item>
        <el-form-item label="出生日期">
            <el-col :span="11">
                <el-date-picker type="date" placeholder="选择日期" v-model="form.date1" style="width: 100%;"></el-date-picker>
            </el-col>
        </el-form-item>
        <el-form-item label="性别">
            <el-checkbox-group v-model="form.type">
                <el-checkbox label="男" name="type"></el-checkbox>
                <el-checkbox label="女" name="type"></el-checkbox>
            </el-checkbox-group>
        </el-form-item>
        <el-form-item label="请输入手机号">
            <el-input v-model="form.tel"></el-input>
        </el-form-item>
        <el-form-item>
            <el-button type="primary" @click="onSubmit">立即创建</el-button>
            <el-button>取消</el-button>
        </el-form-item>
    </el-form>
</div>
<!--引入Axios框架-->
<script src="https://cdn.bootcdn.net/ajax/libs/axios/0.21.1/axios.min.js"></script>
<!--引入Vue框架-->
<script src="https://cdn.staticfile.org/vue/2.6.14/vue.min.js"></script>
<script src="https://cdn.staticfile.org/element-ui/2.15.9/index.min.js"></script>
<script>
    // let v = new Vue({
    //     el:"body>div",
    //     data:{
    //         user:{
    //             username:"",
    //             password:"",
    //             nick:""
    //         }
    //     },
    //     methods:{
    //         reg(){
    //             axios.post("/reg",v.user).then(function (response) {
    //                 if (response.data==1){
    //                     alert("注册成功!");
    //                     location.href = "/";
    //                 }else{
    //                     alert("用户名已存在!");
    //                 }
    //
    //             })
    //         }
    //     }
    // })
</script>
</body>
</html>